#-*- coding:UTF8-*-
import os
import re
import time

lst_chapter = os.listdir('D:/Python/Project/content')
for chapter in lst_chapter:
	try:
		if '第' in chapter:
			path_first = os.path.join('D:/Python/Project/content/',chapter)
			print(path_first)
			num1 = chapter.index('第')
			title = chapter[num1:]
			path_title = os.path.join('D:/Python/Project/content/',title)
			os.rename(path_first, path_title)
		else:
			path_first = os.path.join('D:/Python/Project/content/',chapter)
			os.remove(path_first)
	except FileExistsError as e:
		pass